package com.ajx.blog.entity;

import java.io.Serializable;
import java.time.LocalDate;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import org.springframework.format.annotation.DateTimeFormat;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/*
 * @Author: 姜东浩
 * @Date: 2022-04-22 23:52:23
 * 
 * @Description: 课程信息
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "course_info")
public class CourseInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "cid", type = IdType.AUTO)
    private Integer cid; // 课程主键id

    @TableField(value = "title")
    private String title; // 课程标题

    @TableField(value = "content")
    private String content; // 课程内容介绍

    @TableField(value = "course_image")
    private String courseImage; // 课程展示图像

    @TableField(value = "person_number")
    private Integer personNumber; // 报名人数量

    @TableField(value = "money")
    private Integer money; // 课程售价

    @TableField(value = "createdate")
    private String createdate; // 课程创建时间 数据库timestamp类型,默认自动添加

    @DateTimeFormat(pattern = "yyyy-MM-dd") // 前台向后台转换
    @TableField(value = "begindate")
    private LocalDate begindate; // 课程开始时间

    @DateTimeFormat(pattern = "yyyy-MM-dd") // 前台向后台转换
    @TableField(value = "enddate")
    private LocalDate enddate; // 课程结束时间

    @TableField(value = "cstatus")
    private String cstatus; // 状态

    @TableField(value = "remark")
    private String remark; // 备注

}
